/*
 * PlanRaw.java
 * 
 * Copyright 2004 Christoph Csallner and Yannis Smaragdakis.
 */
package edu.gatech.cc.cnc.plans.stmt;

import static edu.gatech.cc.jcrasher.Assertions.notNull;
import edu.gatech.cc.jcrasher.plans.stmt.Statement;

/**
 * Text representation of a statement, purely text-based.
 * You can pass it any string, so potential bugs
 * in the string might not get noticed until test case
 * compile-time.
 * 
 * @author csallner@gatech.edu (Christoph Csallner)
 */
public class RawStatement implements Statement {

	protected String text = null;
	
	/**
	 * Constructor
	 */
	public RawStatement(String s) {
		notNull(s);
		this.text=s;
	}		
	
	public Boolean execute() {
		throw new IllegalStateException("Cannot execute a raw statement.");
	}

	
	public String text() {
		return text;
	}
	
	@Override
	public String toString() {
		return this.text();
	}
}
